﻿using iMES.Entity.DomainModels;
using iMES.Entity.SystemModels;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace iMES.Entity.DomainModels
{
    [Entity(TableCnName = "班组", TableName = "Team_ShiftManagements", DetailTable = new Type[] { typeof(Team_TeamMembers) }, DetailTableCnName = "班组成员", DBServer = "SysDbContext")]
    public partial class Team_ShiftManagements: SysEntity
    {
        /// <summary>
        ///班组主键
        /// </summary>
        [Key]
        [Display(Name = "班组主键")]
        [Required(AllowEmptyStrings = false)]
        public int Id { get; set; }

        /// <summary>
        ///班组名称
        /// </summary>
        [Display(Name = "班组名称")]
        [MaxLength(100)]
        [Column(TypeName = "varchar(100)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string TeamName { get; set; }

        /// <summary>
        ///编组编码
        /// </summary>
        [Display(Name = "编组编码")]
        [MaxLength(100)]
        [Column(TypeName = "varchar(100)")]
        [Editable(true)]
        public string TeamCode { get; set; }

        /// <summary>
        ///班组类型
        /// </summary>
        [Display(Name = "班组类型")]
        [MaxLength(100)]
        [Column(TypeName = "varchar(100)")]
        [Editable(true)]
        public string TeamType { get; set; }

        /// <summary>
        ///备注
        /// </summary>
        [Display(Name = "备注")]
        [MaxLength(1000)]
        [Column(TypeName = "varchar(1000)")]
        [Editable(true)]
        public string Remark { get; set; }

        /// <summary>
        ///创建人编号
        /// </summary>
        [Display(Name = "创建人编号")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? CreateID { get; set; }

        /// <summary>
        ///创建人
        /// </summary>
        [Display(Name = "创建人")]
        [MaxLength(30)]
        [Column(TypeName = "nvarchar(30)")]
        [Editable(true)]
        public string Creator { get; set; }

        /// <summary>
        ///创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? CreateDate { get; set; }

        /// <summary>
        ///修改人编号
        /// </summary>
        [Display(Name = "修改人编号")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? ModifyID { get; set; }

        /// <summary>
        ///修改人
        /// </summary>
        [Display(Name = "修改人")]
        [MaxLength(30)]
        [Column(TypeName = "nvarchar(30)")]
        [Editable(true)]
        public string Modifier { get; set; }

        /// <summary>
        ///修改时间
        /// </summary>
        [Display(Name = "修改时间")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? ModifyDate { get; set; }

        [Display(Name = "班组成员")]
        [ForeignKey("Id")]
        public List<Team_TeamMembers> Team_TeamMembers { get; set; }
    }
}
